class Post < ActiveRecord::Base

  belongs_to :forum
  belongs_to :user
  has_many :comments
  
  validates_presence_of :title
  validates_presence_of :description
  validates_presence_of :user
  validates_presence_of :forum
  
  validates_uniqueness_of :title, :scope => [:forum_id]

end